package com.zte.smbms_plus.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName smbms_provider
 */
@TableName(value ="smbms_provider")
@Data
public class SmbmsProvider implements Serializable {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 供应商编码
     */
    private String procode;

    /**
     * 供应商名称
     */
    private String proname;

    /**
     * 供应商详细描述
     */
    private String prodesc;

    /**
     * 供应商联系人
     */
    private String procontact;

    /**
     * 联系电话
     */
    private String prophone;

    /**
     * 地址
     */
    private String proaddress;

    /**
     * 传真
     */
    private String profax;

    /**
     * 创建者（userId）
     */
    private Long createdby;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date creationdate;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifydate;

    /**
     * 更新者（userId）
     */
    private Long modifyby;

    /**
     * 删除标志（0 = 未删除，1 = 删除）
     */
    /*private Integer deleteFlag;*/

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SmbmsProvider other = (SmbmsProvider) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProcode() == null ? other.getProcode() == null : this.getProcode().equals(other.getProcode()))
            && (this.getProname() == null ? other.getProname() == null : this.getProname().equals(other.getProname()))
            && (this.getProdesc() == null ? other.getProdesc() == null : this.getProdesc().equals(other.getProdesc()))
            && (this.getProcontact() == null ? other.getProcontact() == null : this.getProcontact().equals(other.getProcontact()))
            && (this.getProphone() == null ? other.getProphone() == null : this.getProphone().equals(other.getProphone()))
            && (this.getProaddress() == null ? other.getProaddress() == null : this.getProaddress().equals(other.getProaddress()))
            && (this.getProfax() == null ? other.getProfax() == null : this.getProfax().equals(other.getProfax()))
            && (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby()))
            && (this.getCreationdate() == null ? other.getCreationdate() == null : this.getCreationdate().equals(other.getCreationdate()))
            && (this.getModifydate() == null ? other.getModifydate() == null : this.getModifydate().equals(other.getModifydate()))
            && (this.getModifyby() == null ? other.getModifyby() == null : this.getModifyby().equals(other.getModifyby()))
            /*&& (this.getDeleteFlag() == null ? other.getDeleteFlag() == null : this.getDeleteFlag().equals(other.getDeleteFlag()))*/;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProcode() == null) ? 0 : getProcode().hashCode());
        result = prime * result + ((getProname() == null) ? 0 : getProname().hashCode());
        result = prime * result + ((getProdesc() == null) ? 0 : getProdesc().hashCode());
        result = prime * result + ((getProcontact() == null) ? 0 : getProcontact().hashCode());
        result = prime * result + ((getProphone() == null) ? 0 : getProphone().hashCode());
        result = prime * result + ((getProaddress() == null) ? 0 : getProaddress().hashCode());
        result = prime * result + ((getProfax() == null) ? 0 : getProfax().hashCode());
        result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode());
        result = prime * result + ((getCreationdate() == null) ? 0 : getCreationdate().hashCode());
        result = prime * result + ((getModifydate() == null) ? 0 : getModifydate().hashCode());
        result = prime * result + ((getModifyby() == null) ? 0 : getModifyby().hashCode());
        /*result = prime * result + ((getDeleteFlag() == null) ? 0 : getDeleteFlag().hashCode());*/
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", procode=").append(procode);
        sb.append(", proname=").append(proname);
        sb.append(", prodesc=").append(prodesc);
        sb.append(", procontact=").append(procontact);
        sb.append(", prophone=").append(prophone);
        sb.append(", proaddress=").append(proaddress);
        sb.append(", profax=").append(profax);
        sb.append(", createdby=").append(createdby);
        sb.append(", creationdate=").append(creationdate);
        sb.append(", modifydate=").append(modifydate);
        sb.append(", modifyby=").append(modifyby);
        /*sb.append(", deleteFlag=").append(deleteFlag);*/
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}